Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Uptime] Add functional UI tests #29667

Merged
merged 78 commits into from
Mar 13, 2019

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jan 30, 2019

Summary

This PR adds some functional UI tests to ensure the pages load, and checks for a few basic values.

Testing this PR

You can refer to the plugin's README for instructions on running functional UI tests. If the instructions are unclear please open an issue for a README update.

NOTE: do not review until #29398 is merged

justinkambic and others added 30 commits January 25, 2019 13:58
* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.
…ch_monitors_adapter.ts


Implement PR feedback.

Co-Authored-By: justinkambic <[email protected]>
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@LeeDr
Copy link

LeeDr commented Mar 11, 2019

My first run of this locally failed for me. It looks like it didn't get the time set correctly. I'll run again and see if I can see why;

       │ debg TestSubjects.click(homeSynopsisLinkuptime)
       │ debg Find.clickByCssSelector('[data-test-subj~="homeSynopsisLinkuptime"]') with timeout=10000
       │ debg Find.findByCssSelector('[data-test-subj~="homeSynopsisLinkuptime"]') with timeout=10000
       │ debg TestSubjects.exists(superDatePickerShowDatesButton)
       │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
       │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
       │ debg Find.clickByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10060ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10039ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10052ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10051ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10005ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10033ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10042ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10010ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10008ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10013ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10006ms
       │ debg Find.findByCssSelector('[data-test-subj~="superDatePickerstartDatePopoverButton"]') with timeout=10000
       │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj~="superDatePickerstartDatePopoverButton"])
       │      Wait timed out after 10049ms
       │ info Taking screenshot "C:\Users\LeeDr\git\kibana\x-pack\test\functional\screenshots\failure\Uptime app overview page loads and displays uptime data based on date range.png"

@LeeDr
Copy link

LeeDr commented Mar 11, 2019

I temporarily hacked this method in test\functional\page_objects\time_picker.js to check if the superDatePickerShowDatesButton exists immediately or not;

    async showStartEndTimes() {
      let isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
      console.log(`+++++++++++++ time_picker.js isShowDatesButton = ${isShowDatesButton}` );
      if (isShowDatesButton) {
        await testSubjects.click('superDatePickerShowDatesButton');
      }
    }

And in the output I see that it initially returns false (page is still loading) but then returns true after a couple of seconds, and then the date does get set properly;

[13:57:16.401644600] │ debg TestSubjects.exists(statusPageContainer)
[13:57:16.478063100] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="statusPageContainer"]') with timeout=2500
[13:57:18.783432400] ++++++++++++++++++++++++++++++++++++++++ setAbsoluteStart
[13:57:18.844369600] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:18.906193600] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:22.771271700] +++++++++++++ time_picker.js isShowDatesButton = false
[13:57:22.825781700] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:22.888098000] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:24.373539300] +++++++++++++ time_picker.js isShowDatesButton = true
[13:57:24.450707300] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:24.511305600] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:24.578500700] +++++++++++++ time_picker.js isShowDatesButton = true
[13:57:24.639666000] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:24.695562400] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:24.749926400] +++++++++++++ time_picker.js isShowDatesButton = true
[13:57:24.825308900] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:24.892555700] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:24.955665400] +++++++++++++ time_picker.js isShowDatesButton = true
[13:57:25.019470000] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:25.073946900] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:25.126577000] +++++++++++++ time_picker.js isShowDatesButton = true
[13:57:25.190388300] │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[13:57:25.254077600] │ debg Find.existsByDisplayedByCssSelector('[data-test-subj~="superDatePickerShowDatesButton"]') with timeout=2500
[13:57:25.324685300] +++++++++++++ time_picker.js isShowDatesButton = true

But then I'm ending up with a blank page;

image

@justinkambic
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@LeeDr
Copy link

LeeDr commented Mar 12, 2019

I have it passing locally for me now with 2 changes;

The first change is in time_picker.js and wasn't a change from this PR. The showStartEndTimes() method checks if a button is visible and if it is, it clicks it. But the problem is if the page and date picker haven't loaded all the way it just misses it. The await testSubjects.exists('superDatePickerToggleQuickMenuButton', { timeout: 20000 }); forces the method to wait for another item in the date picker to be found before going on to check for the other button.

The second change in uptime.ts is to wait for kibanaChrome after clicking the uptime navigation link. This is what our other navigateToApp method does.

Ideally we wouldn't navigate first to home, and then to uptime. But navigating directly to uptime doesn't work for some reason.

$ git diff
diff --git a/test/functional/page_objects/time_picker.js b/test/functional/page_objects/time_picker.js
index 99f4e8b3b6..679c73dbbf 100644
--- a/test/functional/page_objects/time_picker.js
+++ b/test/functional/page_objects/time_picker.js
@@ -122,6 +122,8 @@ export function TimePickerPageProvider({ getService, getPageObjects }) {
     }

     async showStartEndTimes() {
+      // This first await makes sure the superDatePicker has loaded before we check for the ShowDatesButton
+      await testSubjects.exists('superDatePickerToggleQuickMenuButton', { timeout: 20000 });
       const isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
       if (isShowDatesButton) {
         await testSubjects.click('superDatePickerShowDatesButton');
diff --git a/x-pack/test/functional/services/uptime.ts b/x-pack/test/functional/services/uptime.ts
index ed08be75c8..4c0744d600 100644
--- a/x-pack/test/functional/services/uptime.ts
+++ b/x-pack/test/functional/services/uptime.ts
@@ -16,6 +16,7 @@ export const UptimeProvider = ({ getService }: KibanaFunctionalTestDefaultProvid
     },
     async navigateToPlugin() {
       await testSubjects.click('homeSynopsisLinkuptime');
+      await testSubjects.find('kibanaChrome, 240000');
     },
     async monitorIdExists(key: string) {
       await testSubjects.existOrFail(key);

@LeeDr
Copy link

LeeDr commented Mar 12, 2019

Here's my changes now with navigating directly to uptime app and with timestamps removed from URLs

$ git diff
diff --git a/test/functional/page_objects/time_picker.js b/test/functional/page_objects/time_picker.js
index 99f4e8b3b6..679c73dbbf 100644
--- a/test/functional/page_objects/time_picker.js
+++ b/test/functional/page_objects/time_picker.js
@@ -122,6 +122,8 @@ export function TimePickerPageProvider({ getService, getPageObjects }) {
     }

     async showStartEndTimes() {
+      // This first await makes sure the superDatePicker has loaded before we check for the ShowDatesButton
+      await testSubjects.exists('superDatePickerToggleQuickMenuButton', { timeout: 20000 });
       const isShowDatesButton = await testSubjects.exists('superDatePickerShowDatesButton');
       if (isShowDatesButton) {
         await testSubjects.click('superDatePickerShowDatesButton');
diff --git a/test/functional/services/browser.js b/test/functional/services/browser.js
index cac147f2f0..57a29b6d83 100644
--- a/test/functional/services/browser.js
+++ b/test/functional/services/browser.js
@@ -77,7 +77,7 @@ export async function BrowserProvider({ getService }) {
      * @param {boolean} insertTimestamp Optional
      * @return {Promise<void>}
      */
-    async get(url, insertTimestamp = true) {
+    async get(url, insertTimestamp = false) {
       if (insertTimestamp) {
         const urlWithTime = modifyUrl(url, parsed => {
           parsed.query._t = Date.now();
diff --git a/x-pack/test/functional/page_objects/uptime_page.ts b/x-pack/test/functional/page_objects/uptime_page.ts
index 7ceae44be0..a2ecead444 100644
--- a/x-pack/test/functional/page_objects/uptime_page.ts
+++ b/x-pack/test/functional/page_objects/uptime_page.ts
@@ -18,8 +18,7 @@ export const UptimePageProvider = ({
       datePickerStartValue: string,
       monitorIdToCheck: string
     ) {
-      await pageObject.common.navigateToApp('home');
-      await uptimeService.navigateToPlugin();
+      await pageObject.common.navigateToApp('uptime');
       await pageObject.timePicker.setAbsoluteStart(datePickerStartValue);
       await uptimeService.monitorIdExists(monitorIdToCheck);
     }
@@ -29,8 +28,7 @@ export const UptimePageProvider = ({
       monitorId: string,
       monitorName: string
     ) {
-      await pageObject.common.navigateToApp('home');
-      await uptimeService.navigateToPlugin();
+      await pageObject.common.navigateToApp('uptime');
       await pageObject.timePicker.setAbsoluteStart(datePickerStartValue);
       await uptimeService.navigateToMonitorWithId(monitorId);
       if ((await uptimeService.getMonitorNameDisplayedOnPageTitle()) !== monitorName) {
diff --git a/x-pack/test/functional/services/uptime.ts b/x-pack/test/functional/services/uptime.ts
index ed08be75c8..ea4fd9f6ac 100644
--- a/x-pack/test/functional/services/uptime.ts
+++ b/x-pack/test/functional/services/uptime.ts
@@ -16,6 +16,7 @@ export const UptimeProvider = ({ getService }: KibanaFunctionalTestDefaultProvid
     },
     async navigateToPlugin() {
       await testSubjects.click('homeSynopsisLinkuptime');
+      await testSubjects.find('kibanaChrome', 240000);
     },
     async monitorIdExists(key: string) {
       await testSubjects.existOrFail(key);

@justinkambic
Copy link
Contributor Author

@LeeDr please let me know if b50843f looks alright to you, thanks!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@justinkambic
Copy link
Contributor Author

@LeeDr I'm guessing that by defaulting the inclusion of timestamp false instead of true we have broken a number of existing tests. This doesn't seem like something we should do in this PR.

@justinkambic
Copy link
Contributor Author

@LeeDr let me know what you think of 9c886e8. I have added some code that will manually change the $window.location in the Angular controller if the supplied URL path doesn't conform to what the plugin expects. This caused the tests to pass locally for me without requiring to go home first.

I've included a comment explaining why that code is there, and am open to alternative solutions. Given that this code will only really be invoked when running these tests, and real-life navigation in Kibana or via sharing URLs shouldn't impact the plugin, I think this is an acceptable temporary fix.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return {
async assertExists(key: string) {
if (!(await testSubjects.exists(key))) {
throw new Error(`Couldn't find expected element with key "${key}".`);
}
},
async navigateToPlugin() {
await testSubjects.click('homeSynopsisLinkuptime');
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a problem here. This method is clicking the homeSynopsisLinkuptime link but not waiting for the page to load. I still see the spinning K while the test is trying to set the from time.

You might want to consider changing the uptime_page.ts goToUptimeOverviewAndLoadData method like this (take out navigating to home and then to the plugin and navigateToApp straight to uptime since that navigateToApp already should have the appropriate wait for the page to load build in

      // await pageObject.common.navigateToApp('home');
      // await uptimeService.navigateToPlugin();
      await pageObject.common.navigateToApp('uptime');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we aren't using that code anymore, so we can probably delete it safely altogether. I'll post back here after I investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeeDr it looks like we actually did delete that code already, so I think we're good!

@justinkambic justinkambic merged commit 39c0478 into elastic:master Mar 13, 2019
justinkambic added a commit to justinkambic/kibana that referenced this pull request Mar 13, 2019
* Refactor es queries and associated components/endpoints.

* Add unit tests, repair broken tests.

* [Uptime] Add API functional tests for uptime graphQL (elastic#29128)

* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.

* Add HB 7.0 data for API tests.

* Configure first error_list test to work with 7.x data.

* Configure error_list filtered by id to work with 7.x data.

* Configure error_list functional tests to work with 7.x data.

* Update snapshot test to work with 7.x data.

* Update snapshot down filtered test to work with 7.x data.

* Configure snapshot up test to work with 7.x data.

* Configure ping list tests to work with 7.x data.

* Configure monitor list tests to work with 7.x data.

* Configure monitor status bar tests to work with 7.x data.

* Configure filterBar tests to work with 7.x data.

* Configure docCount tests to work with 7.x data.

* Simplify code based on PR feedback.

* Add loading spinner to monitor page title based on PR feedback.

* Rename GQL type based on PR feedback.

* Remove use of 'undefined' in ES query based on PR feedback.

* Simplify code based on PR feedback.

* Add definite size/shard_size for terms agg based on PR feedback.

* Simplify ES query based on PR feedback.

* Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts

Implement PR feedback.

Co-Authored-By: justinkambic <[email protected]>

* Increase size for ES errors query based on PR feedback.

* Fix hardcoded field in terms filter based on PR feedback.

* Simplify get code for monitors function.

* Reduce unnecessarily large size for terms agg based on PR feedback.

* Pluralize filter bar props.

* Refactor filter bar query based on PR feedback.

* Update test.

* Fix busted GQL query.

* Update functional test docs to use data without buggy values.

* Update index name in HB functional api test docs.

* Update snapshot base functional test.

* Make snapshot filter tests pass, fix associated bug.

* Configure remaining snapshot e2e tests to work with 7.x data.

* Give better variable names and comments for ugly code.

* Configure ping list query tests to work with updated 7.x data.

* Rename graphql describe block.

* Update monitor status bar query tests to work with updated 7.x data.

* Update monitor list query tests to work with updated 7.x data.

* Update filter bar query to work with updated 7.x data.

* Update error list query to work with updated 7.x data.

* Update doc count fixture to work with new 7.x data.

* Create functional UI tests for Overview and Monitor pages.

* Add additional waits to functional UI test to try to prevent flakiness.

* [ftr/services/superDatePicker] make specialized service

* Add data-test-subj value to monitor link.

* Remove wait calls from UI tests.

* Set default timezone for tests' kibana server.

* Add @types for mocha and expect.js.

* Implement PR feedback.

* Remove added types.

* Re-add mocha types.

* Remove obsolete comment.

* Disable timestamp on uptime app navigation for functional tests.

* Undo previous change for default value of function parameter.

* Add redirect hack to uptime client to change window location when expected router path is not satisfied.
justinkambic added a commit to justinkambic/kibana that referenced this pull request Mar 13, 2019
* Refactor es queries and associated components/endpoints.

* Add unit tests, repair broken tests.

* [Uptime] Add API functional tests for uptime graphQL (elastic#29128)

* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.

* Add HB 7.0 data for API tests.

* Configure first error_list test to work with 7.x data.

* Configure error_list filtered by id to work with 7.x data.

* Configure error_list functional tests to work with 7.x data.

* Update snapshot test to work with 7.x data.

* Update snapshot down filtered test to work with 7.x data.

* Configure snapshot up test to work with 7.x data.

* Configure ping list tests to work with 7.x data.

* Configure monitor list tests to work with 7.x data.

* Configure monitor status bar tests to work with 7.x data.

* Configure filterBar tests to work with 7.x data.

* Configure docCount tests to work with 7.x data.

* Simplify code based on PR feedback.

* Add loading spinner to monitor page title based on PR feedback.

* Rename GQL type based on PR feedback.

* Remove use of 'undefined' in ES query based on PR feedback.

* Simplify code based on PR feedback.

* Add definite size/shard_size for terms agg based on PR feedback.

* Simplify ES query based on PR feedback.

* Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts

Implement PR feedback.

Co-Authored-By: justinkambic <[email protected]>

* Increase size for ES errors query based on PR feedback.

* Fix hardcoded field in terms filter based on PR feedback.

* Simplify get code for monitors function.

* Reduce unnecessarily large size for terms agg based on PR feedback.

* Pluralize filter bar props.

* Refactor filter bar query based on PR feedback.

* Update test.

* Fix busted GQL query.

* Update functional test docs to use data without buggy values.

* Update index name in HB functional api test docs.

* Update snapshot base functional test.

* Make snapshot filter tests pass, fix associated bug.

* Configure remaining snapshot e2e tests to work with 7.x data.

* Give better variable names and comments for ugly code.

* Configure ping list query tests to work with updated 7.x data.

* Rename graphql describe block.

* Update monitor status bar query tests to work with updated 7.x data.

* Update monitor list query tests to work with updated 7.x data.

* Update filter bar query to work with updated 7.x data.

* Update error list query to work with updated 7.x data.

* Update doc count fixture to work with new 7.x data.

* Create functional UI tests for Overview and Monitor pages.

* Add additional waits to functional UI test to try to prevent flakiness.

* [ftr/services/superDatePicker] make specialized service

* Add data-test-subj value to monitor link.

* Remove wait calls from UI tests.

* Set default timezone for tests' kibana server.

* Add @types for mocha and expect.js.

* Implement PR feedback.

* Remove added types.

* Re-add mocha types.

* Remove obsolete comment.

* Disable timestamp on uptime app navigation for functional tests.

* Undo previous change for default value of function parameter.

* Add redirect hack to uptime client to change window location when expected router path is not satisfied.
justinkambic added a commit that referenced this pull request Mar 13, 2019
* Refactor es queries and associated components/endpoints.

* Add unit tests, repair broken tests.

* [Uptime] Add API functional tests for uptime graphQL (#29128)

* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.

* Add HB 7.0 data for API tests.

* Configure first error_list test to work with 7.x data.

* Configure error_list filtered by id to work with 7.x data.

* Configure error_list functional tests to work with 7.x data.

* Update snapshot test to work with 7.x data.

* Update snapshot down filtered test to work with 7.x data.

* Configure snapshot up test to work with 7.x data.

* Configure ping list tests to work with 7.x data.

* Configure monitor list tests to work with 7.x data.

* Configure monitor status bar tests to work with 7.x data.

* Configure filterBar tests to work with 7.x data.

* Configure docCount tests to work with 7.x data.

* Simplify code based on PR feedback.

* Add loading spinner to monitor page title based on PR feedback.

* Rename GQL type based on PR feedback.

* Remove use of 'undefined' in ES query based on PR feedback.

* Simplify code based on PR feedback.

* Add definite size/shard_size for terms agg based on PR feedback.

* Simplify ES query based on PR feedback.

* Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts

Implement PR feedback.

Co-Authored-By: justinkambic <[email protected]>

* Increase size for ES errors query based on PR feedback.

* Fix hardcoded field in terms filter based on PR feedback.

* Simplify get code for monitors function.

* Reduce unnecessarily large size for terms agg based on PR feedback.

* Pluralize filter bar props.

* Refactor filter bar query based on PR feedback.

* Update test.

* Fix busted GQL query.

* Update functional test docs to use data without buggy values.

* Update index name in HB functional api test docs.

* Update snapshot base functional test.

* Make snapshot filter tests pass, fix associated bug.

* Configure remaining snapshot e2e tests to work with 7.x data.

* Give better variable names and comments for ugly code.

* Configure ping list query tests to work with updated 7.x data.

* Rename graphql describe block.

* Update monitor status bar query tests to work with updated 7.x data.

* Update monitor list query tests to work with updated 7.x data.

* Update filter bar query to work with updated 7.x data.

* Update error list query to work with updated 7.x data.

* Update doc count fixture to work with new 7.x data.

* Create functional UI tests for Overview and Monitor pages.

* Add additional waits to functional UI test to try to prevent flakiness.

* [ftr/services/superDatePicker] make specialized service

* Add data-test-subj value to monitor link.

* Remove wait calls from UI tests.

* Set default timezone for tests' kibana server.

* Add @types for mocha and expect.js.

* Implement PR feedback.

* Remove added types.

* Re-add mocha types.

* Remove obsolete comment.

* Disable timestamp on uptime app navigation for functional tests.

* Undo previous change for default value of function parameter.

* Add redirect hack to uptime client to change window location when expected router path is not satisfied.
@justinkambic
Copy link
Contributor Author

justinkambic commented Mar 13, 2019

justinkambic added a commit that referenced this pull request Mar 13, 2019
* Refactor es queries and associated components/endpoints.

* Add unit tests, repair broken tests.

* [Uptime] Add API functional tests for uptime graphQL (#29128)

* Add API functional tests for uptime graphQL.

* Remove obsolete code.

* Add CI group for UI functional tests.

* Delete obsolete code, rename heartbeat es archive.

* Refactor adapter methods.

* Refactor adapter methods.

* Attempt to fix ci-group tag error.

* Skip functional app tests until later PR.

* Remove unused code.

* Optimize test runs.

* Add uptime to api test index.

* Fix formatting.

* Add HB 7.0 data for API tests.

* Configure first error_list test to work with 7.x data.

* Configure error_list filtered by id to work with 7.x data.

* Configure error_list functional tests to work with 7.x data.

* Update snapshot test to work with 7.x data.

* Update snapshot down filtered test to work with 7.x data.

* Configure snapshot up test to work with 7.x data.

* Configure ping list tests to work with 7.x data.

* Configure monitor list tests to work with 7.x data.

* Configure monitor status bar tests to work with 7.x data.

* Configure filterBar tests to work with 7.x data.

* Configure docCount tests to work with 7.x data.

* Simplify code based on PR feedback.

* Add loading spinner to monitor page title based on PR feedback.

* Rename GQL type based on PR feedback.

* Remove use of 'undefined' in ES query based on PR feedback.

* Simplify code based on PR feedback.

* Add definite size/shard_size for terms agg based on PR feedback.

* Simplify ES query based on PR feedback.

* Update x-pack/plugins/uptime/server/lib/adapters/monitors/elasticsearch_monitors_adapter.ts

Implement PR feedback.

Co-Authored-By: justinkambic <[email protected]>

* Increase size for ES errors query based on PR feedback.

* Fix hardcoded field in terms filter based on PR feedback.

* Simplify get code for monitors function.

* Reduce unnecessarily large size for terms agg based on PR feedback.

* Pluralize filter bar props.

* Refactor filter bar query based on PR feedback.

* Update test.

* Fix busted GQL query.

* Update functional test docs to use data without buggy values.

* Update index name in HB functional api test docs.

* Update snapshot base functional test.

* Make snapshot filter tests pass, fix associated bug.

* Configure remaining snapshot e2e tests to work with 7.x data.

* Give better variable names and comments for ugly code.

* Configure ping list query tests to work with updated 7.x data.

* Rename graphql describe block.

* Update monitor status bar query tests to work with updated 7.x data.

* Update monitor list query tests to work with updated 7.x data.

* Update filter bar query to work with updated 7.x data.

* Update error list query to work with updated 7.x data.

* Update doc count fixture to work with new 7.x data.

* Create functional UI tests for Overview and Monitor pages.

* Add additional waits to functional UI test to try to prevent flakiness.

* [ftr/services/superDatePicker] make specialized service

* Add data-test-subj value to monitor link.

* Remove wait calls from UI tests.

* Set default timezone for tests' kibana server.

* Add @types for mocha and expect.js.

* Implement PR feedback.

* Remove added types.

* Re-add mocha types.

* Remove obsolete comment.

* Disable timestamp on uptime app navigation for functional tests.

* Undo previous change for default value of function parameter.

* Add redirect hack to uptime client to change window location when expected router path is not satisfied.
@justinkambic justinkambic deleted the uptime_func-ui-test branch March 13, 2019 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants